Skip to content

@W-19036340 feat: add programmatic API for LWC dev server with JWT authentication #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Shinoni
Copy link
Collaborator

@Shinoni Shinoni commented Jul 14, 2025

@W-12345678@

What does this PR do?

Adds a programmatic API for starting and managing LWC dev servers without using the CLI. This includes JWT authentication validation and a new LocalDevServerManager class for server lifecycle management.

What issues does this PR fix or reference?

This PR enables programmatic access to the LWC dev server functionality, allowing other tools and applications to start dev servers directly through code instead of only through CLI commands

@Shinoni Shinoni requested review from a team as code owners July 14, 2025 23:56
@@ -40,9 +60,88 @@ describe('lwc-dev-server', () => {
expect(lwcDevServer.startLWCServer).to.be.a('function');
});

// it('calling startLWCServer returns an LWCServer', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I uncommented and fixed this test.


/**
* Programmatic API for starting the local dev server
* This can be used to start the server without CLI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this is the right place for this API. Other consumers would be taking a dependency on the CLI plugin to access this API which seems a little odd.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shinoni Lets hold off on merging this for now. I'm exploring a couple options for how we can do this with the CLI folks and then we can make a decision on where this code should live.

@nrkruk nrkruk added the nomerge Do not merge this PR until label is removed by the author. label Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:signed nomerge Do not merge this PR until label is removed by the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants